<template>
	<view>
		<view class="main">
			<view class="main-item flex" @tap="myMeans">
				<text>我的资料</text>
				<image :src="imgurl+'youjiantou.png'"></image>
			</view>
			<view class="main-item flex" @tap="myScale">
				<text>我的积分</text>
				<image :src="imgurl+'youjiantou.png'"></image>
			</view>
			<view class="kong"></view>
			<view class="main-item other flex">
				<text>当前版本</text>
				<text>免费版</text>
			</view>
		</view>
	</view>
</template>

<script>
	import app from "../../../App.vue"
	export default {
		data() {
			return {
				imgurl: ""
			};
		},
		methods: {
			//我的资料
			myMeans() {
				uni.navigateTo({
					url: "../myMessages/myMessages"
				})
			},
			/* //我的问卷
			myWeNG() {
				uni.navigateTo({
					url: "../myQuestion/myQuestion"
				})
			}, */
			//我的积分
			myScale() {
				uni.navigateTo({
					url: "../myScale/myScale"
				})
			}
		},
		onShareAppMessage(options) {
			let shareObj = {
				success: (res) => {
					if (res.errMsg == 'shareAppMessage:ok') {
						uni.showToast({
							title: '分享成功',
							icon: 'success',
							duration: 1500
						})
					}
				},
				fail: () => {
					if (res.errMsg == 'shareAppMessage:fail cancel') {
						uni.showToast({
							title: '取消分享',
							icon: 'none',
							duration: 2000
						})
					} else if (res.errMsg == 'shareAppMessage:fail') {
						// 转发失败，其中 detail message 为详细失败信息
					}
				},
				complete: () => {
					// 转发结束之后的回调（转发成不成功都会执行）
				}
			}
		},
		onLoad() {
			this.imgurl = app.globalData.imgurls
		}
	}
</script>

<style lang="scss">
	page {
		background: #EEEEEE;
		font-family: PingFang SC;
	}
	.main {
		background: #fff;
		.main-item {
			width: 690rpx;
			height: 100rpx;
			line-height: 100rpx;
			justify-content: space-between;
			border-bottom: 1rpx solid #DFDFDF;
			margin: 0 auto;
			font-size: 36rpx;
			font-weight: 500;
			image {
				width: 55rpx;
				height: 55rpx;
			}
		}
		.other {
			border-bottom: none;
		}
		.kong {
			width: 100%;
			height: 20rpx;
			background: #EEEEEE;
		}
	}
</style>
